package cn.cai.mapper;

import cn.cai.pojo.EduCourse;
import cn.cai.pojo.vo.CourseListVo;
import cn.cai.pojo.vo.CoursePublicVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * <p>
 * 课程 Mapper 接口
 * </p>
 *
 * @author caishenao
 * @since 2021-08-17
 */
@Mapper
public interface EduCourseMapper extends BaseMapper<EduCourse> {
    //根据课程id查询课程信息并返回
    CoursePublicVo getPublishCourseInfo(String courseId);

    IPage<EduCourse> selectPageAndCondition(Page<?> page, CourseListVo queryCourse);

    //多条件分页查询
    List<CourseListVo> selectPage(CourseListVo courseListVo,Integer pageNum,Integer pageSize);
}
